package com.moli.iov.down.enums;

/**
 * <p>
 *  下发命令 状态枚举
 * </p>
 *
 * @author: zql
 * @Date: 2018/12/4 14:44
 */
public enum OperateStatusEnum {

    /**
     * 待下发
     */
    STAY_SEND(1, "待下发"),

    /**
     * 已下发
     */
    ALREADY_SEND(2, "已下发"),

    FAIL(3, "下发失败");

    private int flag;

    private String msg;

    OperateStatusEnum(int flag, String msg){
        this.flag = flag;
        this.msg = msg;
    }

    public static String getMsg(int flag){
        for(OperateStatusEnum e : OperateStatusEnum.values()){
            if(e.flag == flag){
                return e.msg;
            }
        }
        return "";
    }

    public int getFlag() {
        return flag;
    }

}
